package fr.generali.accueilclient.gwt.client.dispatch.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

import fr.generali.accueilclient.gwt.client.dispatch.event.ActionCallbackedEvent.ActionCallbackedHandler;

public class ActionCallbackedEvent extends GwtEvent<ActionCallbackedHandler> {

    public static final Type<ActionCallbackedHandler> TYPE = new Type<ActionCallbackedHandler>();

    public ActionCallbackedEvent() {
    }

    @Override
    protected void dispatch(ActionCallbackedHandler handler) {
        handler.onActionCallbacked(this);
    }

    @Override
    public Type<ActionCallbackedHandler> getAssociatedType() {
        return TYPE;
    }

    public interface ActionCallbackedHandler extends EventHandler {

        void onActionCallbacked(ActionCallbackedEvent event);
    }

}
